import { createStore } from 'vuex'
import workflow from '../../workflow/store/workflow'

let store
export default (app, modules) => {
  const options = {
    namespaced: true,
    modules: {
      app: {
        namespaced: true,
        modules: {
          workflow,
          ...modules
        }
      }
    }
  }
  store = createStore(options)
  app.use(store)
}

export { store }
